
using System;

namespace BeeTest
{
	public class WhenState<T0, T1> : WhenStateBase
	{
		#region Fields & Properties

		private T0 state0;
		private T1 state1;

		#endregion


		#region Constructors

		public WhenState(T0 s0, T1 s1)
			: base(null)
		{
			this.state0 = s0;
			this.state1 = s1;
		}

		public WhenState(Exception exc) 
			: base(exc)
		{
		}

		#endregion


		#region Operations

		public AndThenState<T0, T1> Then(Action<T0, T1> assertFunc)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1);
			return new AndThenState<T0, T1>(this);
		}


		public AndThenState<T0, T1> Then<TP0>(Action<T0, T1, TP0> assertFunc, TP0 arg0)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1, arg0);
			return new AndThenState<T0, T1>(this);
		}


		public AndThenState<T0, T1> Then<TP0, TP1>(Action<T0, T1, TP0, TP1> assertFunc, TP0 arg0, TP1 arg1)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1, arg0, arg1);
			return new AndThenState<T0, T1>(this);
		}


		public AndThenState<T0, T1> Then<TP0, TP1, TP2>(Action<T0, T1, TP0, TP1, TP2> assertFunc, TP0 arg0, TP1 arg1, TP2 arg2)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1, arg0, arg1, arg2);
			return new AndThenState<T0, T1>(this);
		}


		public AndThenState<T0, T1> Then<TP0, TP1, TP2, TP3>(Action<T0, T1, TP0, TP1, TP2, TP3> assertFunc, TP0 arg0, TP1 arg1, TP2 arg2, TP3 arg3)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1, arg0, arg1, arg2, arg3);
			return new AndThenState<T0, T1>(this);
		}


		public AndThenState<T0, T1> Then<TP0, TP1, TP2, TP3, TP4>(Action<T0, T1, TP0, TP1, TP2, TP3, TP4> assertFunc, TP0 arg0, TP1 arg1, TP2 arg2, TP3 arg3, TP4 arg4)
		{
			this.AssertNoExceptionWasThrown();
			assertFunc(this.state0, this.state1, arg0, arg1, arg2, arg3, arg4);
			return new AndThenState<T0, T1>(this);
		}


		#endregion
	}
}
